import request from "../request/request"

export const queryEarlyWarningList = (name,address) => {
    return request({
        url: `/EnergyController/listByLike?name=${name}&address=${address}`,
        method: 'get',
    })
}

export const add = (saveOrUpdate) => {
    return request({
        url: `/EnergyController/insertEnergy`,
        method: 'post',
        data:saveOrUpdate
    })
}


export const update = (saveOrUpdate) => {
    return request({
        url: `/EnergyController/updateById`,
        method: 'put',
        data:saveOrUpdate
    })
}

export const deleteByIdOne = (id) => {
    return request({
        url: `/EnergyController/removeById`,
        method: 'delete',
        params:{id:id}
    })
}